import java.util.Scanner;

/**
 * Created by dllo on 18/3/29.
 */
public class Test04
{
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个3位数");

        int num = scanner.nextInt();


        //重命名 shift + f6;
        for(int i = 100 ;i<= 999; i++){

            int h = i / 100;
            int t = i % 100 / 10;
            int w = i%100 %10;
            if (i == t *t *t + w *w *w +h *h *h){
                System.out.println("是水仙花数" +i);
            }

        }
        int rawNum = num; //原始位
        int hundreds = num / 100;  //百位
        num %= 100;
        int tens = num /10;   // 十位
        num %= 10 ; //个位

        if (rawNum == hundreds *hundreds *hundreds + tens *tens *tens +num *num *num){
            System.out.println("是水仙花数" );
        }else{
            System.out.println("不是水仙花数");
        }

    }
}
